package com.iv.durian.cloud.api.service;

import com.iv.durian.cloud.Banner;
import com.iv.durian.cloud.facade.BannerFacade;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by LiuLin on 2018/6/30 0030.
 */
@Service
public class BannerService {
    @Autowired
    private BannerFacade bannerFacade;

    public List<Banner> list(Integer type,Integer status){
        return bannerFacade.list(type,status);
    }

    public Banner get(Integer bannerId){
        return bannerFacade.get(bannerId);
    }

    public void add(Banner banner){
        bannerFacade.add(banner);
    }

    public int remove(Integer bannerId){
        return bannerFacade.remove(bannerId);
    }

    public int count(Integer type, Integer status){
        return bannerFacade.count(type, status);
    }

    public void update(Banner banner){
        bannerFacade.update(banner);
    }
}
